package com.zhangchuchu.neohealth.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zhangchuchu.neohealth.entity.Comments;
import com.zhangchuchu.neohealth.entity.DTO.CommentsDTO;
import com.zhangchuchu.neohealth.mapper.CommentsMapper;
import com.zhangchuchu.neohealth.service.CommentsService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 评论表(Comments)表服务实现类
 *
 * @author makejava
 * @since 2025-03-29 20:34:33
 */
@Service
public class CommentsServiceImpl extends ServiceImpl<CommentsMapper, Comments> implements CommentsService {

    @Override
    public List<CommentsDTO> getMainCommentsByCommunityId(Long communityId) {
        return baseMapper.getMainCommentsByCommunityId(communityId);
    }

    @Override
    public List<CommentsDTO> getSubCommentsByCommunityId(Long communityId,Long commentId) {
        return baseMapper.getSubCommentsByCommunityId(communityId,commentId);
    }

    @Override
    public List<CommentsDTO> getOneSubCommentsByCommunityId(Long communityId,Long commentId) {
        return baseMapper.getOneSubCommentsByCommunityId(communityId,commentId);
    }
}
